import path from "path";

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'

// 可以使用 unplugin-vue-components 插件, 自动引入组件，并按需引入组件的样式。
import Components from "unplugin-vue-components/vite";
import { VantResolver } from "unplugin-vue-components/resolvers";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    vueJsx(),
    Components({
      resolvers: [VantResolver()],
    })
  ],
  // 配置src的路径别名@
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "src"),
    },
  },
})
